.drag-swap-cards {
  // 全局禁用所有拖拽相关的变换
  * {
    &[draggable="true"] {
      transform: none !important;
      rotate: none !important;
      scale: none !important;
      translate: none !important;
      
      &:active, &:focus, &:hover {
        transform: none !important;
        rotate: none !important;
        scale: none !important;
        translate: none !important;
      }
      
      // 拖拽过程中的所有状态
      &::-webkit-drag-image {
        transform: none !important;
      }
    }
  }
  
  .swap-actions {
    margin-bottom: 16px;
  }

  .drag-hint {
    margin-bottom: 16px;
    background: #f0f8ff;
    border: 1px solid #d6e4ff;
    
    .ant-card-body {
      padding: 12px 16px;
    }
  }

  .formation-title {
    margin-bottom: 20px;
    text-align: center;
  }

  .players-grid {
    margin-bottom: 24px;

    .player-card {
      height: 280px;
      cursor: move;
      transition: all 0.3s ease;
      border: 2px solid transparent;
      position: relative;
      overflow: hidden;
      
      // 强制所有状态下都不变换
      transform: none !important;
      
      // 当没有拖拽状态时，强制重置所有变换
      &:not(.dragging):not(.drag-over) {
        opacity: 1 !important;
        z-index: auto !important;
        animation: none !important;
      }

      &:hover {
        border-color: #1890ff;
        box-shadow: 0 6px 16px rgba(24, 144, 255, 0.2);
        transform: none;

        .drag-indicator {
          opacity: 1;
        }
      }

      &.dragging {
        opacity: 0.7;
        transform: none !important;
        rotate: none !important;
        scale: none !important;
        translate: none !important;
        animation: none !important;
        transition: none !important;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        border-color: #52c41a;
      }

      &.drag-over {
        border-color: #52c41a;
        background: #f6ffed;
        transform: none;
        box-shadow: 0 8px 20px rgba(82, 196, 26, 0.3);

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: rgba(82, 196, 26, 0.1);
          z-index: 1;
        }

        &::after {
          content: '交换位置';
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          background: #52c41a;
          color: white;
          padding: 8px 16px;
          border-radius: 20px;
          font-size: 14px;
          font-weight: bold;
          z-index: 2;
          box-shadow: 0 2px 8px rgba(82, 196, 26, 0.4);
        }
      }

      .ant-card-body {
        padding: 16px;
        height: 100%;
        display: flex;
        flex-direction: column;
      }

      .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;

        .player-rank {
          display: flex;
          align-items: center;
          font-size: 14px;
        }

        .player-level {
          background: #f0f8ff;
          padding: 2px 8px;
          border-radius: 12px;
          border: 1px solid #d6e4ff;
        }
      }

      .player-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 16px;

        .player-avatar {
          margin-bottom: 8px;
          border: 3px solid #f0f0f0;
          transition: all 0.3s ease;
        }

        .player-details {
          text-align: center;

          .player-name {
            margin: 0 0 4px 0;
            font-size: 16px;
          }

          .player-position {
            font-size: 12px;
          }
        }
      }

      .player-score {
        text-align: center;
        margin-bottom: 12px;
        padding: 8px;
        background: #f8f9fa;
        border-radius: 8px;

        .ant-typography:first-child {
          display: block;
        }
      }

      .player-skills {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        margin-bottom: 8px;

        .ant-tag {
          margin: 0;
          font-size: 11px;
          border-radius: 10px;
        }
      }

      .drag-indicator {
        position: absolute;
        top: 8px;
        right: 8px;
        background: rgba(24, 144, 255, 0.1);
        color: #1890ff;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        opacity: 0;
        transition: all 0.3s ease;
      }
    }
  }

  .formation-stats {
    background: #fafafa;
    border: none;

    .ant-card-head {
      background: transparent;
      text-align: center;
    }

    .stat-item {
      text-align: center;
      padding: 12px;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    }
  }
}

// 动画效果
@keyframes swapSuccess {
  0% {
    transform: none;
  }
  50% {
    transform: none;
  }
  100% {
    transform: none;
  }
}

.player-card {
  &.swap-success {
    animation: swapSuccess 0.6s ease;
  }
}

@keyframes dragPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(24, 144, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(24, 144, 255, 0);
  }
}

.player-card.dragging {
  animation: none;
}

// 响应式设计
@media (max-width: 768px) {
  .drag-swap-cards {
    .players-grid {
      .player-card {
        height: 240px;

        .ant-card-body {
          padding: 12px;
        }

        .player-info {
          margin-bottom: 12px;

          .player-avatar {
            width: 48px !important;
            height: 48px !important;
          }

          .player-details {
            .player-name {
              font-size: 14px;
            }

            .player-position {
              font-size: 11px;
            }
          }
        }

        .player-score {
          margin-bottom: 8px;
          padding: 6px;

          .ant-typography:first-child {
            font-size: 16px !important;
          }
        }

        .player-skills {
          margin-bottom: 4px;

          .ant-tag {
            font-size: 10px;
            padding: 0 4px;
          }
        }
      }
    }

    .formation-stats {
      .stat-item {
        padding: 8px;

        .ant-typography {
          font-size: 18px !important;
        }
      }
    }
  }
}
